package com.hk.service;

import java.util.ArrayList;

import com.hk.dtos.BBSDto;
import com.hk.dtos.PhotoDto;
import com.hk.dtos.SearchDto;

import com.hk.idtos.IPhotoDto;

public class PhotoService implements IPhotoDto{
private static PhotoService photoService;
	
	private IPhotoDto photoManager;
	
	private PhotoService(){
		
		photoManager = new PhotoManager();
	}
	
	public static PhotoService getInstance(){
		if(photoService==null){
			
			photoService= new PhotoService();
		}
		return photoService;
	}

	public ArrayList<PhotoDto> getPhotoList() {
		return photoManager.getPhotoList();
	}
	public PhotoDto getPhoto(int seq) {
		return photoManager.getPhoto(seq);
	}
	public void insPhoto(PhotoDto dto) {
		photoManager.insPhoto(dto);
	}
	public ArrayList<PhotoDto> maxSeq() {
		return photoManager.maxSeq();
		
	}
	public boolean modUpdateBoard(PhotoDto dto) {
		return photoManager.modUpdateBoard(dto);
	}
	public boolean del(int seq) {
		return photoManager.del(seq);
	}
	public boolean updel(PhotoDto dto) {
		return photoManager.updel(dto);
	}
	public String getDate() {
		return photoManager.getDate();
	}
	
	public int pcountbbs(){
		return photoManager.pcountbbs();
	}
	@Override
	public ArrayList<PhotoDto> seidbbs(SearchDto sdto) {
		return photoManager.seidbbs(sdto);
	}

	@Override
	public ArrayList<PhotoDto> setitlebbs(SearchDto sdto) {
		return photoManager.setitlebbs(sdto);
	}

	@Override
	public ArrayList<PhotoDto> pagebbs(SearchDto sdto) {
		return photoManager.pagebbs(sdto);
	}
}
